package com.example.robertluozizhao.java.design.single;

/**
 * Created by Lzz on 8/22/2019.
 */

public class SingleHungryClass {

    //1.声明静态final变量并创建对象
    private static final SingleHungryClass instance = new SingleHungryClass();

    //2.私有构造
    private SingleHungryClass() {
    }

    //3.提供获取单例实例方法
    private SingleHungryClass getInstance() {
        return instance;
    }

}
